home *** CD-ROM | disk | FTP | other *** search
Text File | 1990-10-05 | 66.2 KB | 2,626 lines |
- Newsgroups: comp.sources.misc
- X-UNIX-From: eln272v@monu1.cc.monash.edu.au
- from: Russell Lang <rjl@monu1.cc.monash.edu.au>
- subject: v15i018: gnuplot 2.0 patch 1 (3 of 4)
- Sender: allbery@uunet.UU.NET (Brandon S. Allbery - comp.sources.misc)
-
- Posting-number: Volume 15, Issue 18
- Submitted-by: Russell Lang <rjl@monu1.cc.monash.edu.au>
- Archive-name: gnuplot2/patch03
-
- #! /bin/sh
- # This is a shell archive. Remove anything before this line, then unpack
- # it by saving it into a file and typing "sh file". To overwrite existing
- # files, type "sh file -c". You can also feed this as standard input via
- # unshar, or by typing "sh <file", e.g.. If this archive is complete, you
- # will see the following message at the end:
- # "End of shell archive."
- # Contents: patch1b
- # Wrapped by eln272v@monu1 on Tue Sep 18 14:52:59 1990
- PATH=/bin:/usr/bin:/usr/ucb ; export PATH
- if test -f patch1b -a "${1}" != "-c" ; then
- echo shar: Will not over-write existing file \"patch1b\"
- else
- echo shar: Extracting \"patch1b\" \(63974 characters\)
- sed "s/^X//" >patch1b <<'END_OF_patch1b'
- X*** ./graphics.c Tue Mar 27 09:01:22 1990
- X--- ../patch1/graphics.c Mon Sep 10 09:57:37 1990
- X***************
- X*** 60,66
- X static int xleft, xright, ybot, ytop;
- X
- X /* Boundary and scale factors, in user coordinates */
- X! static double xmin, xmax, ymin, ymax;
- X static double xscale, yscale;
- X
- X /* And the functions to map from user to terminal coordinates */
- X
- X--- 60,69 -----
- X static int xleft, xright, ybot, ytop;
- X
- X /* Boundary and scale factors, in user coordinates */
- X! /* x_min, x_max, y_min, y_max are local to this file and
- X! * are not the same as variables of the same names in other files
- X! */
- X! static double x_min, x_max, y_min, y_max;
- X static double xscale, yscale;
- X
- X /* And the functions to map from user to terminal coordinates */
- X***************
- X*** 64,71
- X static double xscale, yscale;
- X
- X /* And the functions to map from user to terminal coordinates */
- X! #define map_x(x) (int)(xleft+(x-xmin)*xscale+0.5) /* maps floating point x to screen */
- X! #define map_y(y) (int)(ybot+(y-ymin)*yscale+0.5) /* same for y */
- X
- X /* (DFK) Watch for cancellation error near zero on axes labels */
- X #define SIGNIF (0.01) /* less than one hundredth of a tic mark */
- X
- X--- 67,74 -----
- X static double xscale, yscale;
- X
- X /* And the functions to map from user to terminal coordinates */
- X! #define map_x(x) (int)(xleft+(x-x_min)*xscale+0.5) /* maps floating point x to screen */
- X! #define map_y(y) (int)(ybot+(y-y_min)*yscale+0.5) /* same for y */
- X
- X /* (DFK) Watch for cancellation error near zero on axes labels */
- X #define SIGNIF (0.01) /* less than one hundredth of a tic mark */
- X***************
- X*** 108,115
- X int_error(errbuf, NO_CARET);
- X } else
- X return(log10(coord));
- X- } else {
- X- return(coord);
- X }
- X return((double)NULL); /* shut lint up */
- X }
- X
- X--- 111,116 -----
- X int_error(errbuf, NO_CARET);
- X } else
- X return(log10(coord));
- X }
- X return(coord);
- X }
- X***************
- X*** 111,117
- X } else {
- X return(coord);
- X }
- X! return((double)NULL); /* shut lint up */
- X }
- X
- X /* borders of plotting area */
- X
- X--- 112,118 -----
- X } else
- X return(log10(coord));
- X }
- X! return(coord);
- X }
- X
- X /* borders of plotting area */
- X***************
- X*** 187,196
- X
- X /* store these in variables global to this file */
- X /* otherwise, we have to pass them around a lot */
- X! xmin = min_x;
- X! xmax = max_x;
- X! ymin = min_y;
- X! ymax = max_y;
- X
- X if (polar) {
- X /* will possibly change xmin, xmax, ymin, ymax */
- X
- X--- 188,197 -----
- X
- X /* store these in variables global to this file */
- X /* otherwise, we have to pass them around a lot */
- X! x_min = min_x;
- X! x_max = max_x;
- X! y_min = min_y;
- X! y_max = max_y;
- X
- X if (polar) {
- X /* will possibly change x_min, x_max, y_min, y_max */
- X***************
- X*** 193,199
- X ymax = max_y;
- X
- X if (polar) {
- X! /* will possibly change xmin, xmax, ymin, ymax */
- X polar_xform(plots,pcount);
- X }
- X
- X
- X--- 194,200 -----
- X y_max = max_y;
- X
- X if (polar) {
- X! /* will possibly change x_min, x_max, y_min, y_max */
- X polar_xform(plots,pcount);
- X }
- X
- X***************
- X*** 197,203
- X polar_xform(plots,pcount);
- X }
- X
- X! if (ymin == VERYLARGE || ymax == -VERYLARGE)
- X int_error("all points undefined!", NO_CARET);
- X
- X if (xmin == VERYLARGE || xmax == -VERYLARGE)
- X
- X--- 198,204 -----
- X polar_xform(plots,pcount);
- X }
- X
- X! if (y_min == VERYLARGE || y_max == -VERYLARGE)
- X int_error("all points undefined!", NO_CARET);
- X
- X if (x_min == VERYLARGE || x_max == -VERYLARGE)
- X***************
- X*** 200,206
- X if (ymin == VERYLARGE || ymax == -VERYLARGE)
- X int_error("all points undefined!", NO_CARET);
- X
- X! if (xmin == VERYLARGE || xmax == -VERYLARGE)
- X int_error("all points undefined!", NO_CARET);
- X
- X /* Apply the desired viewport offsets. */
- X
- X--- 201,207 -----
- X if (y_min == VERYLARGE || y_max == -VERYLARGE)
- X int_error("all points undefined!", NO_CARET);
- X
- X! if (x_min == VERYLARGE || x_max == -VERYLARGE)
- X int_error("all points undefined!", NO_CARET);
- X
- X /* Apply the desired viewport offsets. */
- X***************
- X*** 204,212
- X int_error("all points undefined!", NO_CARET);
- X
- X /* Apply the desired viewport offsets. */
- X! if (ymin < ymax) {
- X! ymin -= boff;
- X! ymax += toff;
- X } else {
- X ymax -= boff;
- X ymin += toff;
- X
- X--- 205,213 -----
- X int_error("all points undefined!", NO_CARET);
- X
- X /* Apply the desired viewport offsets. */
- X! if (y_min < y_max) {
- X! y_min -= boff;
- X! y_max += toff;
- X } else {
- X y_max -= boff;
- X y_min += toff;
- X***************
- X*** 208,215
- X ymin -= boff;
- X ymax += toff;
- X } else {
- X! ymax -= boff;
- X! ymin += toff;
- X }
- X if (xmin < xmax) {
- X xmin -= loff;
- X
- X--- 209,216 -----
- X y_min -= boff;
- X y_max += toff;
- X } else {
- X! y_max -= boff;
- X! y_min += toff;
- X }
- X if (x_min < x_max) {
- X x_min -= loff;
- X***************
- X*** 211,219
- X ymax -= boff;
- X ymin += toff;
- X }
- X! if (xmin < xmax) {
- X! xmin -= loff;
- X! xmax += roff;
- X } else {
- X xmax -= loff;
- X xmin += roff;
- X
- X--- 212,220 -----
- X y_max -= boff;
- X y_min += toff;
- X }
- X! if (x_min < x_max) {
- X! x_min -= loff;
- X! x_max += roff;
- X } else {
- X x_max -= loff;
- X x_min += roff;
- X***************
- X*** 215,222
- X xmin -= loff;
- X xmax += roff;
- X } else {
- X! xmax -= loff;
- X! xmin += roff;
- X }
- X
- X /* SETUP RANGES, SCALES AND TIC PLACES */
- X
- X--- 216,223 -----
- X x_min -= loff;
- X x_max += roff;
- X } else {
- X! x_max -= loff;
- X! x_min += roff;
- X }
- X
- X /* SETUP RANGES, SCALES AND TIC PLACES */
- X***************
- X*** 221,227
- X
- X /* SETUP RANGES, SCALES AND TIC PLACES */
- X if (ytics && yticdef.type == TIC_COMPUTED) {
- X! ytic = make_tics(ymin,ymax,log_y);
- X
- X if (autoscale_ly) {
- X if (ymin < ymax) {
- X
- X--- 222,228 -----
- X
- X /* SETUP RANGES, SCALES AND TIC PLACES */
- X if (ytics && yticdef.type == TIC_COMPUTED) {
- X! ytic = make_tics(y_min,y_max,log_y);
- X
- X if (autoscale_ly) {
- X if (y_min < y_max) {
- X***************
- X*** 224,232
- X ytic = make_tics(ymin,ymax,log_y);
- X
- X if (autoscale_ly) {
- X! if (ymin < ymax) {
- X! ymin = ytic * floor(ymin/ytic);
- X! ymax = ytic * ceil(ymax/ytic);
- X }
- X else { /* reverse axis */
- X ymin = ytic * ceil(ymin/ytic);
- X
- X--- 225,233 -----
- X ytic = make_tics(y_min,y_max,log_y);
- X
- X if (autoscale_ly) {
- X! if (y_min < y_max) {
- X! y_min = ytic * floor(y_min/ytic);
- X! y_max = ytic * ceil(y_max/ytic);
- X }
- X else { /* reverse axis */
- X y_min = ytic * ceil(y_min/ytic);
- X***************
- X*** 229,236
- X ymax = ytic * ceil(ymax/ytic);
- X }
- X else { /* reverse axis */
- X! ymin = ytic * ceil(ymin/ytic);
- X! ymax = ytic * floor(ymax/ytic);
- X }
- X }
- X }
- X
- X--- 230,237 -----
- X y_max = ytic * ceil(y_max/ytic);
- X }
- X else { /* reverse axis */
- X! y_min = ytic * ceil(y_min/ytic);
- X! y_max = ytic * floor(y_max/ytic);
- X }
- X }
- X }
- X***************
- X*** 236,242
- X }
- X
- X if (xtics && xticdef.type == TIC_COMPUTED) {
- X! xtic = make_tics(xmin,xmax,log_x);
- X
- X if (autoscale_lx) {
- X if (xmin < xmax) {
- X
- X--- 237,243 -----
- X }
- X
- X if (xtics && xticdef.type == TIC_COMPUTED) {
- X! xtic = make_tics(x_min,x_max,log_x);
- X
- X if (autoscale_lx) {
- X if (x_min < x_max) {
- X***************
- X*** 239,247
- X xtic = make_tics(xmin,xmax,log_x);
- X
- X if (autoscale_lx) {
- X! if (xmin < xmax) {
- X! xmin = xtic * floor(xmin/xtic);
- X! xmax = xtic * ceil(xmax/xtic);
- X } else {
- X xmin = xtic * ceil(xmin/xtic);
- X xmax = xtic * floor(xmax/xtic);
- X
- X--- 240,248 -----
- X xtic = make_tics(x_min,x_max,log_x);
- X
- X if (autoscale_lx) {
- X! if (x_min < x_max) {
- X! x_min = xtic * floor(x_min/xtic);
- X! x_max = xtic * ceil(x_max/xtic);
- X } else {
- X x_min = xtic * ceil(x_min/xtic);
- X x_max = xtic * floor(x_max/xtic);
- X***************
- X*** 243,250
- X xmin = xtic * floor(xmin/xtic);
- X xmax = xtic * ceil(xmax/xtic);
- X } else {
- X! xmin = xtic * ceil(xmin/xtic);
- X! xmax = xtic * floor(xmax/xtic);
- X }
- X }
- X }
- X
- X--- 244,251 -----
- X x_min = xtic * floor(x_min/xtic);
- X x_max = xtic * ceil(x_max/xtic);
- X } else {
- X! x_min = xtic * ceil(x_min/xtic);
- X! x_max = xtic * floor(x_max/xtic);
- X }
- X }
- X }
- X***************
- X*** 249,259
- X }
- X }
- X
- X! /* This used be xmax == xmin, but that caused an infinite loop once. */
- X! if (fabs(xmax - xmin) < zero)
- X! int_error("xmin should not equal xmax!",NO_CARET);
- X! if (fabs(ymax - ymin) < zero)
- X! int_error("ymin should not equal ymax!",NO_CARET);
- X
- X /* INITIALIZE TERMINAL */
- X if (!term_init) {
- X
- X--- 250,260 -----
- X }
- X }
- X
- X! /* This used be x_max == x_min, but that caused an infinite loop once. */
- X! if (fabs(x_max - x_min) < zero)
- X! int_error("x_min should not equal x_max!",NO_CARET);
- X! if (fabs(y_max - y_min) < zero)
- X! int_error("y_min should not equal y_max!",NO_CARET);
- X
- X /* INITIALIZE TERMINAL */
- X if (!term_init) {
- X***************
- X*** 268,275
- X boundary(scaling);
- X
- X /* SCALE FACTORS */
- X! yscale = (ytop - ybot)/(ymax - ymin);
- X! xscale = (xright - xleft)/(xmax - xmin);
- X
- X /* DRAW AXES */
- X (*t->linetype)(-1); /* axis line type */
- X
- X--- 269,276 -----
- X boundary(scaling);
- X
- X /* SCALE FACTORS */
- X! yscale = (ytop - ybot)/(y_max - y_min);
- X! xscale = (xright - xleft)/(x_max - x_min);
- X
- X /* DRAW AXES */
- X (*t->linetype)(-1); /* axis line type */
- X***************
- X*** 297,304
- X if (ytics) {
- X switch (yticdef.type) {
- X case TIC_COMPUTED: {
- X! if (ymin < ymax)
- X! draw_ytics(ytic * floor(ymin/ytic),
- X ytic,
- X ytic * ceil(ymax/ytic));
- X else
- X
- X--- 298,305 -----
- X if (ytics) {
- X switch (yticdef.type) {
- X case TIC_COMPUTED: {
- X! if (y_min < y_max)
- X! draw_ytics(ytic * floor(y_min/ytic),
- X ytic,
- X ytic * ceil(y_max/ytic));
- X else
- X***************
- X*** 300,306
- X if (ymin < ymax)
- X draw_ytics(ytic * floor(ymin/ytic),
- X ytic,
- X! ytic * ceil(ymax/ytic));
- X else
- X draw_ytics(ytic * floor(ymax/ytic),
- X ytic,
- X
- X--- 301,307 -----
- X if (y_min < y_max)
- X draw_ytics(ytic * floor(y_min/ytic),
- X ytic,
- X! ytic * ceil(y_max/ytic));
- X else
- X draw_ytics(ytic * floor(y_max/ytic),
- X ytic,
- X***************
- X*** 302,308
- X ytic,
- X ytic * ceil(ymax/ytic));
- X else
- X! draw_ytics(ytic * floor(ymax/ytic),
- X ytic,
- X ytic * ceil(ymin/ytic));
- X
- X
- X--- 303,309 -----
- X ytic,
- X ytic * ceil(y_max/ytic));
- X else
- X! draw_ytics(ytic * floor(y_max/ytic),
- X ytic,
- X ytic * ceil(y_min/ytic));
- X
- X***************
- X*** 304,310
- X else
- X draw_ytics(ytic * floor(ymax/ytic),
- X ytic,
- X! ytic * ceil(ymin/ytic));
- X
- X break;
- X }
- X
- X--- 305,311 -----
- X else
- X draw_ytics(ytic * floor(y_max/ytic),
- X ytic,
- X! ytic * ceil(y_min/ytic));
- X
- X break;
- X }
- X***************
- X*** 309,317
- X break;
- X }
- X case TIC_SERIES: {
- X! draw_ytics(yticdef.def.series.start,
- X! yticdef.def.series.incr,
- X! yticdef.def.series.end);
- X break;
- X }
- X case TIC_USER: {
- X
- X--- 310,318 -----
- X break;
- X }
- X case TIC_SERIES: {
- X! draw_series_ytics(yticdef.def.series.start,
- X! yticdef.def.series.incr,
- X! yticdef.def.series.end);
- X break;
- X }
- X case TIC_USER: {
- X***************
- X*** 315,321
- X break;
- X }
- X case TIC_USER: {
- X! draw_user_ytics(yticdef.def.user);
- X break;
- X }
- X default: {
- X
- X--- 316,322 -----
- X break;
- X }
- X case TIC_USER: {
- X! draw_set_ytics(yticdef.def.user);
- X break;
- X }
- X default: {
- X***************
- X*** 331,338
- X if (xtics) {
- X switch (xticdef.type) {
- X case TIC_COMPUTED: {
- X! if (xmin < xmax)
- X! draw_xtics(xtic * floor(xmin/xtic),
- X xtic,
- X xtic * ceil(xmax/xtic));
- X else
- X
- X--- 332,339 -----
- X if (xtics) {
- X switch (xticdef.type) {
- X case TIC_COMPUTED: {
- X! if (x_min < x_max)
- X! draw_xtics(xtic * floor(x_min/xtic),
- X xtic,
- X xtic * ceil(x_max/xtic));
- X else
- X***************
- X*** 334,340
- X if (xmin < xmax)
- X draw_xtics(xtic * floor(xmin/xtic),
- X xtic,
- X! xtic * ceil(xmax/xtic));
- X else
- X draw_xtics(xtic * floor(xmax/xtic),
- X xtic,
- X
- X--- 335,341 -----
- X if (x_min < x_max)
- X draw_xtics(xtic * floor(x_min/xtic),
- X xtic,
- X! xtic * ceil(x_max/xtic));
- X else
- X draw_xtics(xtic * floor(x_max/xtic),
- X xtic,
- X***************
- X*** 336,342
- X xtic,
- X xtic * ceil(xmax/xtic));
- X else
- X! draw_xtics(xtic * floor(xmax/xtic),
- X xtic,
- X xtic * ceil(xmin/xtic));
- X
- X
- X--- 337,343 -----
- X xtic,
- X xtic * ceil(x_max/xtic));
- X else
- X! draw_xtics(xtic * floor(x_max/xtic),
- X xtic,
- X xtic * ceil(x_min/xtic));
- X
- X***************
- X*** 338,344
- X else
- X draw_xtics(xtic * floor(xmax/xtic),
- X xtic,
- X! xtic * ceil(xmin/xtic));
- X
- X break;
- X }
- X
- X--- 339,345 -----
- X else
- X draw_xtics(xtic * floor(x_max/xtic),
- X xtic,
- X! xtic * ceil(x_min/xtic));
- X
- X break;
- X }
- X***************
- X*** 343,351
- X break;
- X }
- X case TIC_SERIES: {
- X! draw_xtics(xticdef.def.series.start,
- X! xticdef.def.series.incr,
- X! xticdef.def.series.end);
- X break;
- X }
- X case TIC_USER: {
- X
- X--- 344,352 -----
- X break;
- X }
- X case TIC_SERIES: {
- X! draw_series_xtics(xticdef.def.series.start,
- X! xticdef.def.series.incr,
- X! xticdef.def.series.end);
- X break;
- X }
- X case TIC_USER: {
- X***************
- X*** 349,355
- X break;
- X }
- X case TIC_USER: {
- X! draw_user_xtics(xticdef.def.user);
- X break;
- X }
- X default: {
- X
- X--- 350,356 -----
- X break;
- X }
- X case TIC_USER: {
- X! draw_set_xtics(xticdef.def.user);
- X break;
- X }
- X default: {
- X***************
- X*** 551,557
- X break;
- X }
- X case OUTRANGE: {
- X! if (!inrange(plot->points[i].x, xmin,xmax))
- X continue;
- X x = map_x(plot->points[i].x);
- X if ((ymin < ymax
- X
- X--- 552,558 -----
- X break;
- X }
- X case OUTRANGE: {
- X! if (!inrange(plot->points[i].x, x_min,x_max))
- X continue;
- X x = map_x(plot->points[i].x);
- X if ((y_min < y_max
- X***************
- X*** 554,569
- X if (!inrange(plot->points[i].x, xmin,xmax))
- X continue;
- X x = map_x(plot->points[i].x);
- X! if ((ymin < ymax
- X! && plot->points[i].y < ymin)
- X! || (ymax < ymin
- X! && plot->points[i].y > ymin))
- X! y = map_y(ymin);
- X! if ((ymin < ymax
- X! && plot->points[i].y > ymax)
- X! || (ymax<ymin
- X! && plot->points[i].y < ymax))
- X! y = map_y(ymax);
- X break;
- X }
- X default: /* just a safety */
- X
- X--- 555,570 -----
- X if (!inrange(plot->points[i].x, x_min,x_max))
- X continue;
- X x = map_x(plot->points[i].x);
- X! if ((y_min < y_max
- X! && plot->points[i].y < y_min)
- X! || (y_max < y_min
- X! && plot->points[i].y > y_min))
- X! y = map_y(y_min);
- X! if ((y_min < y_max
- X! && plot->points[i].y > y_max)
- X! || (y_max<y_min
- X! && plot->points[i].y < y_max))
- X! y = map_y(y_max);
- X break;
- X }
- X default: /* just a safety */
- X***************
- X*** 699,705
- X int i; /* line segment from point i-1 to point i */
- X double *ex, *ey; /* the point where it crosses an edge */
- X {
- X! /* global xmin, xmax, ymin, xmax */
- X double ax = points[i-1].x;
- X double ay = points[i-1].y;
- X double bx = points[i].x;
- X
- X--- 700,706 -----
- X int i; /* line segment from point i-1 to point i */
- X double *ex, *ey; /* the point where it crosses an edge */
- X {
- X! /* global x_min, x_max, y_min, x_max */
- X double ax = points[i-1].x;
- X double ay = points[i-1].y;
- X double bx = points[i].x;
- X***************
- X*** 708,714
- X
- X if (by == ay) {
- X /* horizontal line */
- X! /* assume inrange(by, ymin, ymax) */
- X *ey = by; /* == ay */
- X
- X if (inrange(xmax, ax, bx))
- X
- X--- 709,715 -----
- X
- X if (by == ay) {
- X /* horizontal line */
- X! /* assume inrange(by, y_min, y_max) */
- X *ey = by; /* == ay */
- X
- X if (inrange(x_max, ax, bx))
- X***************
- X*** 711,720
- X /* assume inrange(by, ymin, ymax) */
- X *ey = by; /* == ay */
- X
- X! if (inrange(xmax, ax, bx))
- X! *ex = xmax;
- X! else if (inrange(xmin, ax, bx))
- X! *ex = xmin;
- X else {
- X (*term_tbl[term].text)();
- X (void) fflush(outfile);
- X
- X--- 712,721 -----
- X /* assume inrange(by, y_min, y_max) */
- X *ey = by; /* == ay */
- X
- X! if (inrange(x_max, ax, bx))
- X! *ex = x_max;
- X! else if (inrange(x_min, ax, bx))
- X! *ex = x_min;
- X else {
- X (*term_tbl[term].text)();
- X (void) fflush(outfile);
- X***************
- X*** 723,729
- X return;
- X } else if (bx == ax) {
- X /* vertical line */
- X! /* assume inrange(bx, xmin, xmax) */
- X *ex = bx; /* == ax */
- X
- X if (inrange(ymax, ay, by))
- X
- X--- 724,730 -----
- X return;
- X } else if (bx == ax) {
- X /* vertical line */
- X! /* assume inrange(bx, x_min, x_max) */
- X *ex = bx; /* == ax */
- X
- X if (inrange(y_max, ay, by))
- X***************
- X*** 726,735
- X /* assume inrange(bx, xmin, xmax) */
- X *ex = bx; /* == ax */
- X
- X! if (inrange(ymax, ay, by))
- X! *ey = ymax;
- X! else if (inrange(ymin, ay, by))
- X! *ey = ymin;
- X else {
- X (*term_tbl[term].text)();
- X (void) fflush(outfile);
- X
- X--- 727,736 -----
- X /* assume inrange(bx, x_min, x_max) */
- X *ex = bx; /* == ax */
- X
- X! if (inrange(y_max, ay, by))
- X! *ey = y_max;
- X! else if (inrange(y_min, ay, by))
- X! *ey = y_min;
- X else {
- X (*term_tbl[term].text)();
- X (void) fflush(outfile);
- X***************
- X*** 740,749
- X
- X /* slanted line of some kind */
- X
- X! /* does it intersect ymin edge */
- X! if (inrange(ymin, ay, by) && ymin != ay && ymin != by) {
- X! x = ax + (ymin-ay) * ((bx-ax) / (by-ay));
- X! if (inrange(x, xmin, xmax)) {
- X *ex = x;
- X *ey = ymin;
- X return; /* yes */
- X
- X--- 741,750 -----
- X
- X /* slanted line of some kind */
- X
- X! /* does it intersect y_min edge */
- X! if (inrange(y_min, ay, by) && y_min != ay && y_min != by) {
- X! x = ax + (y_min-ay) * ((bx-ax) / (by-ay));
- X! if (inrange(x, x_min, x_max)) {
- X *ex = x;
- X *ey = y_min;
- X return; /* yes */
- X***************
- X*** 745,751
- X x = ax + (ymin-ay) * ((bx-ax) / (by-ay));
- X if (inrange(x, xmin, xmax)) {
- X *ex = x;
- X! *ey = ymin;
- X return; /* yes */
- X }
- X }
- X
- X--- 746,752 -----
- X x = ax + (y_min-ay) * ((bx-ax) / (by-ay));
- X if (inrange(x, x_min, x_max)) {
- X *ex = x;
- X! *ey = y_min;
- X return; /* yes */
- X }
- X }
- X***************
- X*** 750,759
- X }
- X }
- X
- X! /* does it intersect ymax edge */
- X! if (inrange(ymax, ay, by) && ymax != ay && ymax != by) {
- X! x = ax + (ymax-ay) * ((bx-ax) / (by-ay));
- X! if (inrange(x, xmin, xmax)) {
- X *ex = x;
- X *ey = ymax;
- X return; /* yes */
- X
- X--- 751,760 -----
- X }
- X }
- X
- X! /* does it intersect y_max edge */
- X! if (inrange(y_max, ay, by) && y_max != ay && y_max != by) {
- X! x = ax + (y_max-ay) * ((bx-ax) / (by-ay));
- X! if (inrange(x, x_min, x_max)) {
- X *ex = x;
- X *ey = y_max;
- X return; /* yes */
- X***************
- X*** 755,761
- X x = ax + (ymax-ay) * ((bx-ax) / (by-ay));
- X if (inrange(x, xmin, xmax)) {
- X *ex = x;
- X! *ey = ymax;
- X return; /* yes */
- X }
- X }
- X
- X--- 756,762 -----
- X x = ax + (y_max-ay) * ((bx-ax) / (by-ay));
- X if (inrange(x, x_min, x_max)) {
- X *ex = x;
- X! *ey = y_max;
- X return; /* yes */
- X }
- X }
- X***************
- X*** 760,770
- X }
- X }
- X
- X! /* does it intersect xmin edge */
- X! if (inrange(xmin, ax, bx) && xmin != ax && xmin != bx) {
- X! y = ay + (xmin-ax) * ((by-ay) / (bx-ax));
- X! if (inrange(y, ymin, ymax)) {
- X! *ex = xmin;
- X *ey = y;
- X return;
- X }
- X
- X--- 761,771 -----
- X }
- X }
- X
- X! /* does it intersect x_min edge */
- X! if (inrange(x_min, ax, bx) && x_min != ax && x_min != bx) {
- X! y = ay + (x_min-ax) * ((by-ay) / (bx-ax));
- X! if (inrange(y, y_min, y_max)) {
- X! *ex = x_min;
- X *ey = y;
- X return;
- X }
- X***************
- X*** 770,780
- X }
- X }
- X
- X! /* does it intersect xmax edge */
- X! if (inrange(xmax, ax, bx) && xmax != ax && xmax != bx) {
- X! y = ay + (xmax-ax) * ((by-ay) / (bx-ax));
- X! if (inrange(y, ymin, ymax)) {
- X! *ex = xmax;
- X *ey = y;
- X return;
- X }
- X
- X--- 771,781 -----
- X }
- X }
- X
- X! /* does it intersect x_max edge */
- X! if (inrange(x_max, ax, bx) && x_max != ax && x_max != bx) {
- X! y = ay + (x_max-ax) * ((by-ay) / (bx-ax));
- X! if (inrange(y, y_min, y_max)) {
- X! *ex = x_max;
- X *ey = y;
- X return;
- X }
- X***************
- X*** 791,797
- X */
- X if (ax == -VERYLARGE) {
- X if (ay != -VERYLARGE) {
- X! *ex = min(xmin, xmax);
- X *ey = by;
- X return;
- X }
- X
- X--- 792,798 -----
- X */
- X if (ax == -VERYLARGE) {
- X if (ay != -VERYLARGE) {
- X! *ex = min(x_min, x_max);
- X *ey = by;
- X return;
- X }
- X***************
- X*** 797,803
- X }
- X } else if (bx == -VERYLARGE) {
- X if (by != -VERYLARGE) {
- X! *ex = min(xmin, xmax);
- X *ey = ay;
- X return;
- X }
- X
- X--- 798,804 -----
- X }
- X } else if (bx == -VERYLARGE) {
- X if (by != -VERYLARGE) {
- X! *ex = min(x_min, x_max);
- X *ey = ay;
- X return;
- X }
- X***************
- X*** 804,810
- X } else if (ay == -VERYLARGE) {
- X /* note we know ax != -VERYLARGE */
- X *ex = bx;
- X! *ey = min(ymin, ymax);
- X return;
- X } else if (by == -VERYLARGE) {
- X /* note we know bx != -VERYLARGE */
- X
- X--- 805,811 -----
- X } else if (ay == -VERYLARGE) {
- X /* note we know ax != -VERYLARGE */
- X *ex = bx;
- X! *ey = min(y_min, y_max);
- X return;
- X } else if (by == -VERYLARGE) {
- X /* note we know bx != -VERYLARGE */
- X***************
- X*** 809,815
- X } else if (by == -VERYLARGE) {
- X /* note we know bx != -VERYLARGE */
- X *ex = ax;
- X! *ey = min(ymin, ymax);
- X return;
- X }
- X
- X
- X--- 810,816 -----
- X } else if (by == -VERYLARGE) {
- X /* note we know bx != -VERYLARGE */
- X *ex = ax;
- X! *ey = min(y_min, y_max);
- X return;
- X }
- X
- X***************
- X*** 846,852
- X int i; /* line segment from point i-1 to point i */
- X double *lx, *ly; /* lx[2], ly[2]: points where it crosses edges */
- X {
- X! /* global xmin, xmax, ymin, xmax */
- X double ax = points[i-1].x;
- X double ay = points[i-1].y;
- X double bx = points[i].x;
- X
- X--- 847,853 -----
- X int i; /* line segment from point i-1 to point i */
- X double *lx, *ly; /* lx[2], ly[2]: points where it crosses edges */
- X {
- X! /* global x_min, x_max, y_min, x_max */
- X double ax = points[i-1].x;
- X double ay = points[i-1].y;
- X double bx = points[i].x;
- X***************
- X*** 856,865
- X
- X if (by == ay) {
- X /* horizontal line */
- X! /* y coord must be in range, and line must span both xmin and xmax */
- X! /* note that spanning xmin implies spanning xmax */
- X! if (inrange(by, ymin, ymax) && inrange(xmin, ax, bx)) {
- X! *lx++ = xmin;
- X *ly++ = by;
- X *lx++ = xmax;
- X *ly++ = by;
- X
- X--- 857,866 -----
- X
- X if (by == ay) {
- X /* horizontal line */
- X! /* y coord must be in range, and line must span both x_min and x_max */
- X! /* note that spanning x_min implies spanning x_max */
- X! if (inrange(by, y_min, y_max) && inrange(x_min, ax, bx)) {
- X! *lx++ = x_min;
- X *ly++ = by;
- X *lx++ = x_max;
- X *ly++ = by;
- X***************
- X*** 861,867
- X if (inrange(by, ymin, ymax) && inrange(xmin, ax, bx)) {
- X *lx++ = xmin;
- X *ly++ = by;
- X! *lx++ = xmax;
- X *ly++ = by;
- X return(TRUE);
- X } else
- X
- X--- 862,868 -----
- X if (inrange(by, y_min, y_max) && inrange(x_min, ax, bx)) {
- X *lx++ = x_min;
- X *ly++ = by;
- X! *lx++ = x_max;
- X *ly++ = by;
- X return(TRUE);
- X } else
- X***************
- X*** 868,876
- X return(FALSE);
- X } else if (bx == ax) {
- X /* vertical line */
- X! /* x coord must be in range, and line must span both ymin and ymax */
- X! /* note that spanning ymin implies spanning ymax */
- X! if (inrange(bx, xmin, xmax) && inrange(ymin, ay, by)) {
- X *lx++ = bx;
- X *ly++ = ymin;
- X *lx++ = bx;
- X
- X--- 869,877 -----
- X return(FALSE);
- X } else if (bx == ax) {
- X /* vertical line */
- X! /* x coord must be in range, and line must span both y_min and y_max */
- X! /* note that spanning y_min implies spanning y_max */
- X! if (inrange(bx, x_min, x_max) && inrange(y_min, ay, by)) {
- X *lx++ = bx;
- X *ly++ = y_min;
- X *lx++ = bx;
- X***************
- X*** 872,878
- X /* note that spanning ymin implies spanning ymax */
- X if (inrange(bx, xmin, xmax) && inrange(ymin, ay, by)) {
- X *lx++ = bx;
- X! *ly++ = ymin;
- X *lx++ = bx;
- X *ly++ = ymax;
- X return(TRUE);
- X
- X--- 873,879 -----
- X /* note that spanning y_min implies spanning y_max */
- X if (inrange(bx, x_min, x_max) && inrange(y_min, ay, by)) {
- X *lx++ = bx;
- X! *ly++ = y_min;
- X *lx++ = bx;
- X *ly++ = y_max;
- X return(TRUE);
- X***************
- X*** 874,880
- X *lx++ = bx;
- X *ly++ = ymin;
- X *lx++ = bx;
- X! *ly++ = ymax;
- X return(TRUE);
- X } else
- X return(FALSE);
- X
- X--- 875,881 -----
- X *lx++ = bx;
- X *ly++ = y_min;
- X *lx++ = bx;
- X! *ly++ = y_max;
- X return(TRUE);
- X } else
- X return(FALSE);
- X***************
- X*** 883,892
- X /* slanted line of some kind */
- X /* there can be only zero or two intersections below */
- X
- X! /* does it intersect ymin edge */
- X! if (inrange(ymin, ay, by)) {
- X! x = ax + (ymin-ay) * ((bx-ax) / (by-ay));
- X! if (inrange(x, xmin, xmax)) {
- X *lx++ = x;
- X *ly++ = ymin;
- X intersect = TRUE;
- X
- X--- 884,893 -----
- X /* slanted line of some kind */
- X /* there can be only zero or two intersections below */
- X
- X! /* does it intersect y_min edge */
- X! if (inrange(y_min, ay, by)) {
- X! x = ax + (y_min-ay) * ((bx-ax) / (by-ay));
- X! if (inrange(x, x_min, x_max)) {
- X *lx++ = x;
- X *ly++ = y_min;
- X intersect = TRUE;
- X***************
- X*** 888,894
- X x = ax + (ymin-ay) * ((bx-ax) / (by-ay));
- X if (inrange(x, xmin, xmax)) {
- X *lx++ = x;
- X! *ly++ = ymin;
- X intersect = TRUE;
- X }
- X }
- X
- X--- 889,895 -----
- X x = ax + (y_min-ay) * ((bx-ax) / (by-ay));
- X if (inrange(x, x_min, x_max)) {
- X *lx++ = x;
- X! *ly++ = y_min;
- X intersect = TRUE;
- X }
- X }
- X***************
- X*** 893,902
- X }
- X }
- X
- X! /* does it intersect ymax edge */
- X! if (inrange(ymax, ay, by)) {
- X! x = ax + (ymax-ay) * ((bx-ax) / (by-ay));
- X! if (inrange(x, xmin, xmax)) {
- X *lx++ = x;
- X *ly++ = ymax;
- X intersect = TRUE;
- X
- X--- 894,903 -----
- X }
- X }
- X
- X! /* does it intersect y_max edge */
- X! if (inrange(y_max, ay, by)) {
- X! x = ax + (y_max-ay) * ((bx-ax) / (by-ay));
- X! if (inrange(x, x_min, x_max)) {
- X *lx++ = x;
- X *ly++ = y_max;
- X intersect = TRUE;
- X***************
- X*** 898,904
- X x = ax + (ymax-ay) * ((bx-ax) / (by-ay));
- X if (inrange(x, xmin, xmax)) {
- X *lx++ = x;
- X! *ly++ = ymax;
- X intersect = TRUE;
- X }
- X }
- X
- X--- 899,905 -----
- X x = ax + (y_max-ay) * ((bx-ax) / (by-ay));
- X if (inrange(x, x_min, x_max)) {
- X *lx++ = x;
- X! *ly++ = y_max;
- X intersect = TRUE;
- X }
- X }
- X***************
- X*** 903,913
- X }
- X }
- X
- X! /* does it intersect xmin edge */
- X! if (inrange(xmin, ax, bx)) {
- X! y = ay + (xmin-ax) * ((by-ay) / (bx-ax));
- X! if (inrange(y, ymin, ymax)) {
- X! *lx++ = xmin;
- X *ly++ = y;
- X intersect = TRUE;
- X }
- X
- X--- 904,914 -----
- X }
- X }
- X
- X! /* does it intersect x_min edge */
- X! if (inrange(x_min, ax, bx)) {
- X! y = ay + (x_min-ax) * ((by-ay) / (bx-ax));
- X! if (inrange(y, y_min, y_max)) {
- X! *lx++ = x_min;
- X *ly++ = y;
- X intersect = TRUE;
- X }
- X***************
- X*** 913,923
- X }
- X }
- X
- X! /* does it intersect xmax edge */
- X! if (inrange(xmax, ax, bx)) {
- X! y = ay + (xmax-ax) * ((by-ay) / (bx-ax));
- X! if (inrange(y, ymin, ymax)) {
- X! *lx++ = xmax;
- X *ly++ = y;
- X intersect = TRUE;
- X }
- X
- X--- 914,924 -----
- X }
- X }
- X
- X! /* does it intersect x_max edge */
- X! if (inrange(x_max, ax, bx)) {
- X! y = ay + (x_max-ax) * ((by-ay) / (bx-ax));
- X! if (inrange(y, y_min, y_max)) {
- X! *lx++ = x_max;
- X *ly++ = y;
- X intersect = TRUE;
- X }
- X***************
- X*** 935,942
- X */
- X if (ax == -VERYLARGE) {
- X if (ay != -VERYLARGE
- X! && inrange(by, ymin, ymax) && inrange(xmax, ax, bx)) {
- X! *lx++ = xmin;
- X *ly = by;
- X *lx++ = xmax;
- X *ly = by;
- X
- X--- 936,943 -----
- X */
- X if (ax == -VERYLARGE) {
- X if (ay != -VERYLARGE
- X! && inrange(by, y_min, y_max) && inrange(x_max, ax, bx)) {
- X! *lx++ = x_min;
- X *ly = by;
- X *lx++ = x_max;
- X *ly = by;
- X***************
- X*** 938,944
- X && inrange(by, ymin, ymax) && inrange(xmax, ax, bx)) {
- X *lx++ = xmin;
- X *ly = by;
- X! *lx++ = xmax;
- X *ly = by;
- X intersect = TRUE;
- X }
- X
- X--- 939,945 -----
- X && inrange(by, y_min, y_max) && inrange(x_max, ax, bx)) {
- X *lx++ = x_min;
- X *ly = by;
- X! *lx++ = x_max;
- X *ly = by;
- X intersect = TRUE;
- X }
- X***************
- X*** 944,951
- X }
- X } else if (bx == -VERYLARGE) {
- X if (by != -VERYLARGE
- X! && inrange(ay, ymin, ymax) && inrange(xmax, ax, bx)) {
- X! *lx++ = xmin;
- X *ly = ay;
- X *lx++ = xmax;
- X *ly = ay;
- X
- X--- 945,952 -----
- X }
- X } else if (bx == -VERYLARGE) {
- X if (by != -VERYLARGE
- X! && inrange(ay, y_min, y_max) && inrange(x_max, ax, bx)) {
- X! *lx++ = x_min;
- X *ly = ay;
- X *lx++ = x_max;
- X *ly = ay;
- X***************
- X*** 947,953
- X && inrange(ay, ymin, ymax) && inrange(xmax, ax, bx)) {
- X *lx++ = xmin;
- X *ly = ay;
- X! *lx++ = xmax;
- X *ly = ay;
- X intersect = TRUE;
- X }
- X
- X--- 948,954 -----
- X && inrange(ay, y_min, y_max) && inrange(x_max, ax, bx)) {
- X *lx++ = x_min;
- X *ly = ay;
- X! *lx++ = x_max;
- X *ly = ay;
- X intersect = TRUE;
- X }
- X***************
- X*** 953,959
- X }
- X } else if (ay == -VERYLARGE) {
- X /* note we know ax != -VERYLARGE */
- X! if (inrange(bx, xmin, xmax) && inrange(ymax, ay, by)) {
- X *lx++ = bx;
- X *ly = ymin;
- X *lx++ = bx;
- X
- X--- 954,960 -----
- X }
- X } else if (ay == -VERYLARGE) {
- X /* note we know ax != -VERYLARGE */
- X! if (inrange(bx, x_min, x_max) && inrange(y_max, ay, by)) {
- X *lx++ = bx;
- X *ly = y_min;
- X *lx++ = bx;
- X***************
- X*** 955,961
- X /* note we know ax != -VERYLARGE */
- X if (inrange(bx, xmin, xmax) && inrange(ymax, ay, by)) {
- X *lx++ = bx;
- X! *ly = ymin;
- X *lx++ = bx;
- X *ly = ymax;
- X intersect = TRUE;
- X
- X--- 956,962 -----
- X /* note we know ax != -VERYLARGE */
- X if (inrange(bx, x_min, x_max) && inrange(y_max, ay, by)) {
- X *lx++ = bx;
- X! *ly = y_min;
- X *lx++ = bx;
- X *ly = y_max;
- X intersect = TRUE;
- X***************
- X*** 957,963
- X *lx++ = bx;
- X *ly = ymin;
- X *lx++ = bx;
- X! *ly = ymax;
- X intersect = TRUE;
- X }
- X } else if (by == -VERYLARGE) {
- X
- X--- 958,964 -----
- X *lx++ = bx;
- X *ly = y_min;
- X *lx++ = bx;
- X! *ly = y_max;
- X intersect = TRUE;
- X }
- X } else if (by == -VERYLARGE) {
- X***************
- X*** 962,968
- X }
- X } else if (by == -VERYLARGE) {
- X /* note we know bx != -VERYLARGE */
- X! if (inrange(ax, xmin, xmax) && inrange(ymax, ay, by)) {
- X *lx++ = ax;
- X *ly = ymin;
- X *lx++ = ax;
- X
- X--- 963,969 -----
- X }
- X } else if (by == -VERYLARGE) {
- X /* note we know bx != -VERYLARGE */
- X! if (inrange(ax, x_min, x_max) && inrange(y_max, ay, by)) {
- X *lx++ = ax;
- X *ly = y_min;
- X *lx++ = ax;
- X***************
- X*** 964,970
- X /* note we know bx != -VERYLARGE */
- X if (inrange(ax, xmin, xmax) && inrange(ymax, ay, by)) {
- X *lx++ = ax;
- X! *ly = ymin;
- X *lx++ = ax;
- X *ly = ymax;
- X intersect = TRUE;
- X
- X--- 965,971 -----
- X /* note we know bx != -VERYLARGE */
- X if (inrange(ax, x_min, x_max) && inrange(y_max, ay, by)) {
- X *lx++ = ax;
- X! *ly = y_min;
- X *lx++ = ax;
- X *ly = y_max;
- X intersect = TRUE;
- X***************
- X*** 966,972
- X *lx++ = ax;
- X *ly = ymin;
- X *lx++ = ax;
- X! *ly = ymax;
- X intersect = TRUE;
- X }
- X }
- X
- X--- 967,973 -----
- X *lx++ = ax;
- X *ly = y_min;
- X *lx++ = ax;
- X! *ly = y_max;
- X intersect = TRUE;
- X }
- X }
- X***************
- X*** 993,1002
- X If not autoscaling, use the yrange for both x and y ranges.
- X */
- X if (autoscale_ly) {
- X! xmin = VERYLARGE;
- X! ymin = VERYLARGE;
- X! xmax = -VERYLARGE;
- X! ymax = -VERYLARGE;
- X autoscale_lx = TRUE;
- X } else {
- X xmin = ymin;
- X
- X--- 994,1003 -----
- X If not autoscaling, use the yrange for both x and y ranges.
- X */
- X if (autoscale_ly) {
- X! x_min = VERYLARGE;
- X! y_min = VERYLARGE;
- X! x_max = -VERYLARGE;
- X! y_max = -VERYLARGE;
- X autoscale_lx = TRUE;
- X } else {
- X x_min = y_min;
- X***************
- X*** 999,1006
- X ymax = -VERYLARGE;
- X autoscale_lx = TRUE;
- X } else {
- X! xmin = ymin;
- X! xmax = ymax;
- X }
- X
- X this_plot = plots;
- X
- X--- 1000,1007 -----
- X y_max = -VERYLARGE;
- X autoscale_lx = TRUE;
- X } else {
- X! x_min = y_min;
- X! x_max = y_max;
- X }
- X
- X this_plot = plots;
- X***************
- X*** 1017,1026
- X pnts[i].x = x;
- X pnts[i].y = y;
- X if (autoscale_ly) {
- X! if (xmin > x) xmin = x;
- X! if (xmax < x) xmax = x;
- X! if (ymin > y) ymin = y;
- X! if (ymax < y) ymax = y;
- X pnts[i].type = INRANGE;
- X } else if(inrange(x, xmin, xmax) && inrange(y, ymin, ymax))
- X pnts[i].type = INRANGE;
- X
- X--- 1018,1027 -----
- X pnts[i].x = x;
- X pnts[i].y = y;
- X if (autoscale_ly) {
- X! if (x_min > x) x_min = x;
- X! if (x_max < x) x_max = x;
- X! if (y_min > y) y_min = y;
- X! if (y_max < y) y_max = y;
- X pnts[i].type = INRANGE;
- X } else if(inrange(x, x_min, x_max) && inrange(y, y_min, y_max))
- X pnts[i].type = INRANGE;
- X***************
- X*** 1022,1028
- X if (ymin > y) ymin = y;
- X if (ymax < y) ymax = y;
- X pnts[i].type = INRANGE;
- X! } else if(inrange(x, xmin, xmax) && inrange(y, ymin, ymax))
- X pnts[i].type = INRANGE;
- X else
- X pnts[i].type = OUTRANGE;
- X
- X--- 1023,1029 -----
- X if (y_min > y) y_min = y;
- X if (y_max < y) y_max = y;
- X pnts[i].type = INRANGE;
- X! } else if(inrange(x, x_min, x_max) && inrange(y, y_min, y_max))
- X pnts[i].type = INRANGE;
- X else
- X pnts[i].type = OUTRANGE;
- X***************
- X*** 1030,1036
- X }
- X }
- X
- X! if (autoscale_lx && anydefined && fabs(xmax - xmin) < zero) {
- X /* This happens at least for the plot of 1/cos(x) (vertical line). */
- X fprintf(stderr, "Warning: empty x range [%g:%g], ", xmin,xmax);
- X if (xmin == 0.0) {
- X
- X--- 1031,1037 -----
- X }
- X }
- X
- X! if (autoscale_lx && anydefined && fabs(x_max - x_min) < zero) {
- X /* This happens at least for the plot of 1/cos(x) (vertical line). */
- X fprintf(stderr, "Warning: empty x range [%g:%g], ", x_min,x_max);
- X if (x_min == 0.0) {
- X***************
- X*** 1032,1041
- X
- X if (autoscale_lx && anydefined && fabs(xmax - xmin) < zero) {
- X /* This happens at least for the plot of 1/cos(x) (vertical line). */
- X! fprintf(stderr, "Warning: empty x range [%g:%g], ", xmin,xmax);
- X! if (xmin == 0.0) {
- X! xmin = -1;
- X! xmax = 1;
- X } else {
- X xmin *= 0.9;
- X xmax *= 1.1;
- X
- X--- 1033,1042 -----
- X
- X if (autoscale_lx && anydefined && fabs(x_max - x_min) < zero) {
- X /* This happens at least for the plot of 1/cos(x) (vertical line). */
- X! fprintf(stderr, "Warning: empty x range [%g:%g], ", x_min,x_max);
- X! if (x_min == 0.0) {
- X! x_min = -1;
- X! x_max = 1;
- X } else {
- X x_min *= 0.9;
- X x_max *= 1.1;
- X***************
- X*** 1037,1044
- X xmin = -1;
- X xmax = 1;
- X } else {
- X! xmin *= 0.9;
- X! xmax *= 1.1;
- X }
- X fprintf(stderr, "adjusting to [%g:%g]\n", xmin,xmax);
- X }
- X
- X--- 1038,1045 -----
- X x_min = -1;
- X x_max = 1;
- X } else {
- X! x_min *= 0.9;
- X! x_max *= 1.1;
- X }
- X fprintf(stderr, "adjusting to [%g:%g]\n", x_min,x_max);
- X }
- X***************
- X*** 1040,1046
- X xmin *= 0.9;
- X xmax *= 1.1;
- X }
- X! fprintf(stderr, "adjusting to [%g:%g]\n", xmin,xmax);
- X }
- X if (autoscale_ly && anydefined && fabs(ymax - ymin) < zero) {
- X /* This happens at least for the plot of 1/sin(x) (horiz. line). */
- X
- X--- 1041,1047 -----
- X x_min *= 0.9;
- X x_max *= 1.1;
- X }
- X! fprintf(stderr, "adjusting to [%g:%g]\n", x_min,x_max);
- X }
- X if (autoscale_ly && anydefined && fabs(y_max - y_min) < zero) {
- X /* This happens at least for the plot of 1/sin(x) (horiz. line). */
- X***************
- X*** 1042,1048
- X }
- X fprintf(stderr, "adjusting to [%g:%g]\n", xmin,xmax);
- X }
- X! if (autoscale_ly && anydefined && fabs(ymax - ymin) < zero) {
- X /* This happens at least for the plot of 1/sin(x) (horiz. line). */
- X fprintf(stderr, "Warning: empty y range [%g:%g], ", ymin, ymax);
- X if (ymin == 0.0) {
- X
- X--- 1043,1049 -----
- X }
- X fprintf(stderr, "adjusting to [%g:%g]\n", x_min,x_max);
- X }
- X! if (autoscale_ly && anydefined && fabs(y_max - y_min) < zero) {
- X /* This happens at least for the plot of 1/sin(x) (horiz. line). */
- X fprintf(stderr, "Warning: empty y range [%g:%g], ", y_min, y_max);
- X if (y_min == 0.0) {
- X***************
- X*** 1044,1053
- X }
- X if (autoscale_ly && anydefined && fabs(ymax - ymin) < zero) {
- X /* This happens at least for the plot of 1/sin(x) (horiz. line). */
- X! fprintf(stderr, "Warning: empty y range [%g:%g], ", ymin, ymax);
- X! if (ymin == 0.0) {
- X! ymin = -1;
- X! ymax = 1;
- X } else {
- X ymin *= 0.9;
- X ymax *= 1.1;
- X
- X--- 1045,1054 -----
- X }
- X if (autoscale_ly && anydefined && fabs(y_max - y_min) < zero) {
- X /* This happens at least for the plot of 1/sin(x) (horiz. line). */
- X! fprintf(stderr, "Warning: empty y range [%g:%g], ", y_min, y_max);
- X! if (y_min == 0.0) {
- X! y_min = -1;
- X! y_max = 1;
- X } else {
- X y_min *= 0.9;
- X y_max *= 1.1;
- X***************
- X*** 1049,1056
- X ymin = -1;
- X ymax = 1;
- X } else {
- X! ymin *= 0.9;
- X! ymax *= 1.1;
- X }
- X fprintf(stderr, "adjusting to [%g:%g]\n", ymin, ymax);
- X }
- X
- X--- 1050,1057 -----
- X y_min = -1;
- X y_max = 1;
- X } else {
- X! y_min *= 0.9;
- X! y_max *= 1.1;
- X }
- X fprintf(stderr, "adjusting to [%g:%g]\n", y_min, y_max);
- X }
- X***************
- X*** 1052,1058
- X ymin *= 0.9;
- X ymax *= 1.1;
- X }
- X! fprintf(stderr, "adjusting to [%g:%g]\n", ymin, ymax);
- X }
- X }
- X
- X
- X--- 1053,1059 -----
- X y_min *= 0.9;
- X y_max *= 1.1;
- X }
- X! fprintf(stderr, "adjusting to [%g:%g]\n", y_min, y_max);
- X }
- X }
- X
- X***************
- X*** 1067,1073
- X double ticmin, ticmax; /* for checking if tic is almost inrange */
- X
- X if (end == VERYLARGE) /* for user-def series */
- X! end = max(ymin,ymax);
- X
- X /* limit to right side of plot */
- X end = min(end, max(ymin,ymax));
- X
- X--- 1068,1074 -----
- X double ticmin, ticmax; /* for checking if tic is almost inrange */
- X
- X if (end == VERYLARGE) /* for user-def series */
- X! end = max(y_min,y_max);
- X
- X /* limit to right side of plot */
- X end = min(end, max(y_min,y_max));
- X***************
- X*** 1070,1076
- X end = max(ymin,ymax);
- X
- X /* limit to right side of plot */
- X! end = min(end, max(ymin,ymax));
- X
- X /* to allow for rounding errors */
- X ticmin = min(ymin,ymax) - SIGNIF*incr;
- X
- X--- 1071,1077 -----
- X end = max(y_min,y_max);
- X
- X /* limit to right side of plot */
- X! end = min(end, max(y_min,y_max));
- X
- X /* to allow for rounding errors */
- X ticmin = min(y_min,y_max) - SIGNIF*incr;
- X***************
- X*** 1073,1080
- X end = min(end, max(ymin,ymax));
- X
- X /* to allow for rounding errors */
- X! ticmin = min(ymin,ymax) - SIGNIF*incr;
- X! ticmax = max(ymin,ymax) + SIGNIF*incr;
- X end = end + SIGNIF*incr;
- X
- X for (ticplace = start; ticplace <= end; ticplace +=incr) {
- X
- X--- 1074,1081 -----
- X end = min(end, max(y_min,y_max));
- X
- X /* to allow for rounding errors */
- X! ticmin = min(y_min,y_max) - SIGNIF*incr;
- X! ticmax = max(y_min,y_max) + SIGNIF*incr;
- X end = end + SIGNIF*incr;
- X
- X for (ticplace = start; ticplace <= end; ticplace +=incr) {
- X***************
- X*** 1085,1091
- X for (ltic = 2; ltic <= 9; ltic++) {
- X lticplace = ticplace+log10((double)ltic);
- X if ( inrange(lticplace,ticmin,ticmax) )
- X! ytick(lticplace, (char *)NULL, incr, 0.5);
- X }
- X }
- X }
- X
- X--- 1086,1092 -----
- X for (ltic = 2; ltic <= 9; ltic++) {
- X lticplace = ticplace+log10((double)ltic);
- X if ( inrange(lticplace,ticmin,ticmax) )
- X! ytick(lticplace, "\0", incr, 0.5);
- X }
- X }
- X }
- X***************
- X*** 1091,1097
- X }
- X }
- X
- X-
- X /* DRAW_XTICS: draw a regular tic series, x axis */
- X draw_xtics(start, incr, end)
- X double start, incr, end; /* tic series definition */
- X
- X--- 1092,1097 -----
- X }
- X }
- X
- X /* DRAW_XTICS: draw a regular tic series, x axis */
- X draw_xtics(start, incr, end)
- X double start, incr, end; /* tic series definition */
- X***************
- X*** 1103,1109
- X double ticmin, ticmax; /* for checking if tic is almost inrange */
- X
- X if (end == VERYLARGE) /* for user-def series */
- X! end = max(xmin,xmax);
- X
- X /* limit to right side of plot */
- X end = min(end, max(xmin,xmax));
- X
- X--- 1103,1109 -----
- X double ticmin, ticmax; /* for checking if tic is almost inrange */
- X
- X if (end == VERYLARGE) /* for user-def series */
- X! end = max(x_min,x_max);
- X
- X /* limit to right side of plot */
- X end = min(end, max(x_min,x_max));
- X***************
- X*** 1106,1112
- X end = max(xmin,xmax);
- X
- X /* limit to right side of plot */
- X! end = min(end, max(xmin,xmax));
- X
- X /* to allow for rounding errors */
- X ticmin = min(xmin,xmax) - SIGNIF*incr;
- X
- X--- 1106,1112 -----
- X end = max(x_min,x_max);
- X
- X /* limit to right side of plot */
- X! end = min(end, max(x_min,x_max));
- X
- X /* to allow for rounding errors */
- X ticmin = min(x_min,x_max) - SIGNIF*incr;
- X***************
- X*** 1109,1116
- X end = min(end, max(xmin,xmax));
- X
- X /* to allow for rounding errors */
- X! ticmin = min(xmin,xmax) - SIGNIF*incr;
- X! ticmax = max(xmin,xmax) + SIGNIF*incr;
- X end = end + SIGNIF*incr;
- X
- X for (ticplace = start; ticplace <= end; ticplace +=incr) {
- X
- X--- 1109,1116 -----
- X end = min(end, max(x_min,x_max));
- X
- X /* to allow for rounding errors */
- X! ticmin = min(x_min,x_max) - SIGNIF*incr;
- X! ticmax = max(x_min,x_max) + SIGNIF*incr;
- X end = end + SIGNIF*incr;
- X
- X for (ticplace = start; ticplace <= end; ticplace +=incr) {
- X***************
- X*** 1121,1127
- X for (ltic = 2; ltic <= 9; ltic++) {
- X lticplace = ticplace+log10((double)ltic);
- X if ( inrange(lticplace,ticmin,ticmax) )
- X! xtick(lticplace, (char *)NULL, incr, 0.5);
- X }
- X }
- X }
- X
- X--- 1121,1127 -----
- X for (ltic = 2; ltic <= 9; ltic++) {
- X lticplace = ticplace+log10((double)ltic);
- X if ( inrange(lticplace,ticmin,ticmax) )
- X! xtick(lticplace, "\0", incr, 0.5);
- X }
- X }
- X }
- X***************
- X*** 1127,1134
- X }
- X }
- X
- X! /* DRAW_USER_YTICS: draw a user tic series, y axis */
- X! draw_user_ytics(list)
- X struct ticmark *list; /* list of tic marks */
- X {
- X double ticplace;
- X
- X--- 1127,1189 -----
- X }
- X }
- X
- X! /* DRAW_SERIES_YTICS: draw a user tic series, y axis */
- X! draw_series_ytics(start, incr, end)
- X! double start, incr, end; /* tic series definition */
- X! /* assume start < end, incr > 0 */
- X! {
- X! double ticplace, place;
- X! double ticmin, ticmax; /* for checking if tic is almost inrange */
- X! double spacing = log_y ? log10(incr) : incr;
- X!
- X! if (end == VERYLARGE)
- X! end = max(CheckLog(log_y, y_min), CheckLog(log_y, y_max));
- X! else
- X! /* limit to right side of plot */
- X! end = min(end, max(CheckLog(log_y, y_min), CheckLog(log_y, y_max)));
- X!
- X! /* to allow for rounding errors */
- X! ticmin = min(y_min,y_max) - SIGNIF*incr;
- X! ticmax = max(y_min,y_max) + SIGNIF*incr;
- X! end = end + SIGNIF*incr;
- X!
- X! for (ticplace = start; ticplace <= end; ticplace +=incr) {
- X! place = (log_y ? log10(ticplace) : ticplace);
- X! if ( inrange(place,ticmin,ticmax) )
- X! ytick(place, yformat, spacing, 1.0);
- X! }
- X! }
- X!
- X!
- X! /* DRAW_SERIES_XTICS: draw a user tic series, x axis */
- X! draw_series_xtics(start, incr, end)
- X! double start, incr, end; /* tic series definition */
- X! /* assume start < end, incr > 0 */
- X! {
- X! double ticplace, place;
- X! double ticmin, ticmax; /* for checking if tic is almost inrange */
- X! double spacing = log_x ? log10(incr) : incr;
- X!
- X! if (end == VERYLARGE)
- X! end = max(CheckLog(log_x, x_min), CheckLog(log_x, x_max));
- X! else
- X! /* limit to right side of plot */
- X! end = min(end, max(CheckLog(log_x, x_min), CheckLog(log_x, x_max)));
- X!
- X! /* to allow for rounding errors */
- X! ticmin = min(x_min,x_max) - SIGNIF*incr;
- X! ticmax = max(x_min,x_max) + SIGNIF*incr;
- X! end = end + SIGNIF*incr;
- X!
- X! for (ticplace = start; ticplace <= end; ticplace +=incr) {
- X! place = (log_x ? log10(ticplace) : ticplace);
- X! if ( inrange(place,ticmin,ticmax) )
- X! xtick(place, xformat, spacing, 1.0);
- X! }
- X! }
- X!
- X! /* DRAW_SET_YTICS: draw a user tic set, y axis */
- X! draw_set_ytics(list)
- X struct ticmark *list; /* list of tic marks */
- X {
- X double ticplace;
- X***************
- X*** 1132,1139
- X struct ticmark *list; /* list of tic marks */
- X {
- X double ticplace;
- X! double incr = (ymax - ymin) / 10;
- X! /* global xmin, xmax, xscale, ymin, ymax, yscale */
- X
- X while (list != NULL) {
- X ticplace = list->position;
- X
- X--- 1187,1194 -----
- X struct ticmark *list; /* list of tic marks */
- X {
- X double ticplace;
- X! double incr = (y_max - y_min) / 10;
- X! /* global x_min, x_max, xscale, y_min, y_max, yscale */
- X
- X while (list != NULL) {
- X ticplace = (log_y ? log10(list->position) : list->position);
- X***************
- X*** 1136,1145
- X /* global xmin, xmax, xscale, ymin, ymax, yscale */
- X
- X while (list != NULL) {
- X! ticplace = list->position;
- X! if ( inrange(ticplace, ymin, ymax) /* in range */
- X! || NearlyEqual(ticplace, ymin, incr) /* == ymin */
- X! || NearlyEqual(ticplace, ymax, incr)) /* == ymax */
- X ytick(ticplace, list->label, incr, 1.0);
- X
- X list = list->next;
- X
- X--- 1191,1200 -----
- X /* global x_min, x_max, xscale, y_min, y_max, yscale */
- X
- X while (list != NULL) {
- X! ticplace = (log_y ? log10(list->position) : list->position);
- X! if ( inrange(ticplace, y_min, y_max) /* in range */
- X! || NearlyEqual(ticplace, y_min, incr) /* == y_min */
- X! || NearlyEqual(ticplace, y_max, incr)) /* == y_max */
- X ytick(ticplace, list->label, incr, 1.0);
- X
- X list = list->next;
- X***************
- X*** 1146,1153
- X }
- X }
- X
- X! /* DRAW_USER_XTICS: draw a user tic series, x axis */
- X! draw_user_xtics(list)
- X struct ticmark *list; /* list of tic marks */
- X {
- X double ticplace;
- X
- X--- 1201,1208 -----
- X }
- X }
- X
- X! /* DRAW_SET_XTICS: draw a user tic set, x axis */
- X! draw_set_xtics(list)
- X struct ticmark *list; /* list of tic marks */
- X {
- X double ticplace;
- X***************
- X*** 1151,1158
- X struct ticmark *list; /* list of tic marks */
- X {
- X double ticplace;
- X! double incr = (xmax - xmin) / 10;
- X! /* global xmin, xmax, xscale, ymin, ymax, yscale */
- X
- X while (list != NULL) {
- X ticplace = list->position;
- X
- X--- 1206,1213 -----
- X struct ticmark *list; /* list of tic marks */
- X {
- X double ticplace;
- X! double incr = (x_max - x_min) / 10;
- X! /* global x_min, x_max, xscale, y_min, y_max, yscale */
- X
- X while (list != NULL) {
- X ticplace = (log_x ? log10(list->position) : list->position);
- X***************
- X*** 1155,1164
- X /* global xmin, xmax, xscale, ymin, ymax, yscale */
- X
- X while (list != NULL) {
- X! ticplace = list->position;
- X! if ( inrange(ticplace, xmin, xmax) /* in range */
- X! || NearlyEqual(ticplace, xmin, incr) /* == xmin */
- X! || NearlyEqual(ticplace, xmax, incr)) /* == xmax */
- X xtick(ticplace, list->label, incr, 1.0);
- X
- X list = list->next;
- X
- X--- 1210,1219 -----
- X /* global x_min, x_max, xscale, y_min, y_max, yscale */
- X
- X while (list != NULL) {
- X! ticplace = (log_x ? log10(list->position) : list->position);
- X! if ( inrange(ticplace, x_min, x_max) /* in range */
- X! || NearlyEqual(ticplace, x_min, incr) /* == x_min */
- X! || NearlyEqual(ticplace, x_max, incr)) /* == x_max */
- X xtick(ticplace, list->label, incr, 1.0);
- X
- X list = list->next;
- X***************
- X*** 1194,1209
- X }
- X
- X /* label the ticmark */
- X! if (text) {
- X! (void) sprintf(ticlabel, text, CheckLog(log_y, place));
- X! if ((*t->justify_text)(RIGHT)) {
- X! (*t->put_text)(xleft-(t->h_char),
- X! map_y(place), ticlabel);
- X! } else {
- X! (*t->put_text)(xleft-(t->h_char)*(strlen(ticlabel)+1),
- X! map_y(place), ticlabel);
- X! }
- X! }
- X }
- X
- X /* draw and label an x-axis ticmark */
- X
- X--- 1249,1265 -----
- X }
- X
- X /* label the ticmark */
- X! if (text == NULL)
- X! text = yformat;
- X!
- X! (void) sprintf(ticlabel, text, CheckLog(log_y, place));
- X! if ((*t->justify_text)(RIGHT)) {
- X! (*t->put_text)(xleft-(t->h_char),
- X! map_y(place), ticlabel);
- X! } else {
- X! (*t->put_text)(xleft-(t->h_char)*(strlen(ticlabel)+1),
- X! map_y(place), ticlabel);
- X! }
- X }
- X
- X /* draw and label an x-axis ticmark */
- X***************
- X*** 1233,1239
- X (*t->move)(map_x(place), ybot);
- X (*t->vector)(map_x(place), ybot - ticsize);
- X }
- X!
- X /* label the ticmark */
- X if (text) {
- X (void) sprintf(ticlabel, text, CheckLog(log_x, place));
- X
- X--- 1289,1295 -----
- X (*t->move)(map_x(place), ybot);
- X (*t->vector)(map_x(place), ybot - ticsize);
- X }
- X!
- X /* label the ticmark */
- X if (text == NULL)
- X text = xformat;
- X***************
- X*** 1235,1248
- X }
- X
- X /* label the ticmark */
- X! if (text) {
- X! (void) sprintf(ticlabel, text, CheckLog(log_x, place));
- X! if ((*t->justify_text)(CENTRE)) {
- X! (*t->put_text)(map_x(place),
- X! ybot-(t->v_char), ticlabel);
- X! } else {
- X! (*t->put_text)(map_x(place)-(t->h_char)*strlen(ticlabel)/2,
- X! ybot-(t->v_char), ticlabel);
- X! }
- X }
- X }
- X
- X--- 1291,1305 -----
- X }
- X
- X /* label the ticmark */
- X! if (text == NULL)
- X! text = xformat;
- X!
- X! (void) sprintf(ticlabel, text, CheckLog(log_x, place));
- X! if ((*t->justify_text)(CENTRE)) {
- X! (*t->put_text)(map_x(place),
- X! ybot-(t->v_char), ticlabel);
- X! } else {
- X! (*t->put_text)(map_x(place)-(t->h_char)*strlen(ticlabel)/2,
- X! ybot-(t->v_char), ticlabel);
- X }
- X }
- Xdiff -cr ./docs/gnuplot.1 ../patch/docs/gnuplot.1
- X*** ./docs/gnuplot.1 Tue Mar 27 08:59:42 1990
- X--- ../patch/docs/gnuplot.1 Thu Sep 6 09:59:07 1990
- X***************
- X*** 1,5
- X .\" dummy line
- X! .TH GNUPLOT 1 "13 February 1990"
- X .UC 4
- X .SH NAME
- X gnuplot \- an interactive plotting program
- X
- X--- 1,5 -----
- X .\" dummy line
- X! .TH GNUPLOT 1 "31 August 1990"
- X .UC 4
- X .SH NAME
- X gnuplot \- an interactive plotting program
- X***************
- X*** 4,10
- X .SH NAME
- X gnuplot \- an interactive plotting program
- X .SH SYNOPSIS
- X! .B gnuplot file ...
- X .br
- X .SH DESCRIPTION
- X .I Gnuplot
- X
- X--- 4,11 -----
- X .SH NAME
- X gnuplot \- an interactive plotting program
- X .SH SYNOPSIS
- X! .B gnuplot
- X! [ X11 options ] [file ...]
- X .br
- X .SH DESCRIPTION
- X .I Gnuplot
- X***************
- X*** 38,43
- X BBN BitGraph,
- X Roland DXY800A,
- X EEPIC,
- X Epson LX-800,
- X Fig,
- X HP2623,
- X
- X--- 39,46 -----
- X BBN BitGraph,
- X Roland DXY800A,
- X EEPIC,
- X+ EmTeX,
- X+ Epson 60dpi printers,
- X Epson LX-800,
- X Fig,
- X HP2623,
- X***************
- X*** 54,59
- X QMS QUIC,
- X ReGis (VT125 and VT2xx),
- X Selanar,
- X Tek 401x,
- X Vectrix 384,
- X and unixplot.
- X
- X--- 57,64 -----
- X QMS QUIC,
- X ReGis (VT125 and VT2xx),
- X Selanar,
- X+ Star color printer,
- X+ Tandy DMP-130 printer,
- X Tek 401x,
- X Tek 410x,
- X Vectrix 384,
- X***************
- X*** 55,60
- X ReGis (VT125 and VT2xx),
- X Selanar,
- X Tek 401x,
- X Vectrix 384,
- X and unixplot.
- X The PC version compiled by Microsoft C
- X
- X--- 60,66 -----
- X Star color printer,
- X Tandy DMP-130 printer,
- X Tek 401x,
- X+ Tek 410x,
- X Vectrix 384,
- X Unix PC (ATT 3b1 or ATT 7300)
- X unixplot,
- X***************
- X*** 56,62
- X Selanar,
- X Tek 401x,
- X Vectrix 384,
- X! and unixplot.
- X The PC version compiled by Microsoft C
- X supports IBM CGA, EGA, VGA, Hercules, ATT 6300,
- X and Corona 325 graphics.
- X
- X--- 62,70 -----
- X Tek 401x,
- X Tek 410x,
- X Vectrix 384,
- X! Unix PC (ATT 3b1 or ATT 7300)
- X! unixplot,
- X! and X11.
- X The PC version compiled by Microsoft C
- X supports IBM CGA, EGA, VGA, Hercules, ATT 6300,
- X and Corona 325 graphics.
- X***************
- X*** 61,67
- X supports IBM CGA, EGA, VGA, Hercules, ATT 6300,
- X and Corona 325 graphics.
- X The PC version compiled by Turbo C
- X! supports IBM CGA, EGA, MCGA, VGA and Hercules graphics.
- X Other devices can be added simply, but will require recompiling.
- X .PP
- X Shell escapes and command line substitution.
- X
- X--- 69,75 -----
- X supports IBM CGA, EGA, VGA, Hercules, ATT 6300,
- X and Corona 325 graphics.
- X The PC version compiled by Turbo C
- X! supports IBM CGA, EGA, MCGA, VGA, Hercules and ATT 6300 graphics.
- X Other devices can be added simply, but will require recompiling.
- X .PP
- X Shell escapes and command line substitution.
- X***************
- X*** 73,78
- X All computations performed in the complex domain. Just the real part is
- X plotted by default, but functions like imag() and abs() and arg() are
- X available to override this.
- X .SH AUTHORS
- X Thomas Williams, Pixar Corporation,
- X .br
- X
- X--- 81,123 -----
- X All computations performed in the complex domain. Just the real part is
- X plotted by default, but functions like imag() and abs() and arg() are
- X available to override this.
- X+ .SH X11 OPTIONS
- X+ .I Gnuplot
- X+ provides two terminal types (\fIx11\fP and \fIX11\fP) for use
- X+ with X servers. The \fIX11\fP terminal type provides differing colors as well
- X+ as shapes for the \fIpoints\fP plotting style. The two types are otherwise
- X+ identical. When used with either of these terminal types, \fIgnuplot\fP
- X+ honors all the standard X Toolkit options and resources such as geometry, font,
- X+ foreground and background. See the X(1) man page for a description of
- X+ the options. For color or grayscale displays \fIgnuplot\fP also honors
- X+ the following resources (shown here with default values):
- X+ .sp
- X+ .B "gnuplot*textColor: black"
- X+ .br
- X+ .B "gnuplot*borderColor: black"
- X+ .br
- X+ .B "gnuplot*axisColor: black"
- X+ .br
- X+ .B "gnuplot*line1Color: red"
- X+ .br
- X+ .B "gnuplot*line2Color: green"
- X+ .br
- X+ .B "gnuplot*line3Color: blue"
- X+ .br
- X+ .B "gnuplot*line4Color: magenta"
- X+ .br
- X+ .B "gnuplot*line5Color: cyan"
- X+ .br
- X+ .B "gnuplot*line6Color: sienna"
- X+ .br
- X+ .B "gnuplot*line7Color: orange"
- X+ .br
- X+ .B "gnuplot*line8Color: coral"
- X+ .br
- X+ .PP
- X+ The size or aspect ratio of a plot may be changed by resizing the
- X+ .I gnuplot
- X+ window.
- X .SH AUTHORS
- X Thomas Williams, Pixar Corporation,
- X .br
- X***************
- X*** 87,92
- X Further additions by David Kotz, Duke University, North Carolina, USA.
- X .br
- X (dfk@cs.duke.edu)
- X .SH BUGS
- X The atan() function does not work correctly for complex arguments.
- X .br
- X
- X--- 132,139 -----
- X Further additions by David Kotz, Duke University, North Carolina, USA.
- X .br
- X (dfk@cs.duke.edu)
- X+ .br
- X+ X11 support by Ed Kubaitis, University of Illinois, USA.
- X .SH BUGS
- X The atan() function does not work correctly for complex arguments.
- X .br
- X***************
- X*** 90,95
- X .SH BUGS
- X The atan() function does not work correctly for complex arguments.
- X .br
- X See the
- X .I help bugs
- X command in gnuplot.
- X
- X--- 137,144 -----
- X .SH BUGS
- X The atan() function does not work correctly for complex arguments.
- X .br
- X+ The bessel functions do not work for complex arguments.
- X+ .br
- X See the
- X .I help bugs
- X command in gnuplot.
- X***************
- X*** 95,97
- X command in gnuplot.
- X .SH SEE ALSO
- X See the printed manual or the on-line help for details on specific commands.
- X
- X--- 144,148 -----
- X command in gnuplot.
- X .SH SEE ALSO
- X See the printed manual or the on-line help for details on specific commands.
- X+ .br
- X+ X(1).
- Xdiff -cr ./docs/gnuplot.doc ../patch/docs/gnuplot.doc
- X*** ./docs/gnuplot.doc Tue Mar 27 08:59:55 1990
- X--- ../patch/docs/gnuplot.doc Wed Sep 12 17:36:14 1990
- X***************
- X*** 21,26
- X many commands.
- X
- X For help on any topic, type 'help' followed by the name of the topic.
- X 2 clear
- X ?clear
- X The `clear` command erases the current screen or output device as
- X
- X--- 21,39 -----
- X many commands.
- X
- X For help on any topic, type 'help' followed by the name of the topic.
- X+ 2 cd
- X+ ?cd
- X+ The `cd` command changes working directory.
- X+
- X+ Syntax:
- X+ cd <directory-name>
- X+
- X+ The directory name must be enclosed in quotes.
- X+
- X+ Examples:
- X+
- X+ cd 'subdir'
- X+ cd ".."
- X 2 clear
- X ?clear
- X The `clear` command erases the current screen or output device as
- X***************
- X*** 30,36
- X ?comments
- X Comments are supported as follows: a # may appear in most places in a line
- X and GNUPLOT will ignore the rest of the line. It will not have this
- X! affect inside quotes, inside numbers (including complex numbers), inside
- X command substitutions, etc. In short, it works anywhere it makes sense
- X to work.
- X 2 environment
- X
- X--- 43,49 -----
- X ?comments
- X Comments are supported as follows: a # may appear in most places in a line
- X and GNUPLOT will ignore the rest of the line. It will not have this
- X! effect inside quotes, inside numbers (including complex numbers), inside
- X command substitutions, etc. In short, it works anywhere it makes sense
- X to work.
- X 2 environment
- X***************
- X*** 49,56
- X On VMS, the symbol GNUPLOT$HELP should be defined as the name of
- X the help library for gnuplot.
- X
- X! On Unix, HOME is used as the name of a directory to search for a
- X! .gnuplot file if none is found in the current directory.
- X On MS-DOS, GNUPLOT is used. On VMS, SYS$LOGIN: is used.
- X See help start-up.
- X
- X
- X--- 62,69 -----
- X On VMS, the symbol GNUPLOT$HELP should be defined as the name of
- X the help library for gnuplot.
- X
- X! On Unix, HOME is used as the name of a directory to search for
- X! a .gnuplot file if none is found in the current directory.
- X On MS-DOS, GNUPLOT is used. On VMS, SYS$LOGIN: is used.
- X See help start-up.
- X
- X***************
- X*** 653,658
- X print <expression>
- X
- X See `expressions`.
- X 2 quit
- X ?quit
- X The `exit` and `quit` commands and your computer's END-OF-FILE
- X
- X--- 666,677 -----
- X print <expression>
- X
- X See `expressions`.
- X+ 2 pwd
- X+ ?pwd
- X+ The `pwd` command prints the name of the working directory to the screen.
- X+
- X+ Syntax:
- X+ pwd
- X 2 quit
- X ?quit
- X The `exit` and `quit` commands and your computer's END-OF-FILE
- X***************
- X*** 1400,1405
- X ?bugs
- X The atan() function does not work correctly for complex arguments.
- X
- X The most important known bug is actually in the stdio library for the
- X Sun4 operating system (SunOS Sys4-3.2). The "%g" format for `printf`
- X sometimes incorrectly prints numbers (e.g., 200000.0 as "2"). Thus,
- X
- X--- 1419,1426 -----
- X ?bugs
- X The atan() function does not work correctly for complex arguments.
- X
- X+ The bessel functions do not work for complex arguments.
- X+
- X The most important known bug is actually in the stdio library for the
- X Sun4 operating system (SunOS Sys4-3.2). The "%g" format for `printf`
- X sometimes incorrectly prints numbers (e.g., 200000.0 as "2"). Thus,
- X***************
- X*** 1446,1448
- X %g format than release 2.4, but not much. Trailing decimal points are
- X now removed, but trailing zeros are still not removed from %g numbers
- X in exponential format.
- X
- X--- 1467,1472 -----
- X %g format than release 2.4, but not much. Trailing decimal points are
- X now removed, but trailing zeros are still not removed from %g numbers
- X in exponential format.
- X+
- X+ Please report any bugs you find to pixar!bug-gnuplot@sun.com or
- X+ pixar!bug-gnuplot@ucbvax.berkeley.edu.
- XCommon subdirectories: ./docs/latextut and ../patch/docs/latextut
- Xdiff -cr ./docs/latextut/tutorial.tex ../patch/docs/latextut/tutorial.tex
- X*** ./docs/latextut/tutorial.tex Tue Mar 27 09:00:42 1990
- X--- ../patch/docs/latextut/tutorial.tex Tue Aug 28 16:17:28 1990
- X***************
- X*** 57,62
- X and may produce better-looking plots. See Section~\ref{s:eepic} for
- X more information.
- X
- X \section{Using GNUPLOT for \LaTeX: a Tutorial}
- X
- X GNUPLOT is by nature an interactive program. Users making plots for
- X
- X--- 57,68 -----
- X and may produce better-looking plots. See Section~\ref{s:eepic} for
- X more information.
- X
- X+ There is a small package of auxiliary files (makefiles and scripts)
- X+ that I find useful for making \LaTeX\ plots with GNUPLOT. This is
- X+ available for \verb+ftp+ as \verb+pub/gnuplot-latex.shar+ from
- X+ \verb+cs.duke.edu+. I can mail copies (see the end of this paper for
- X+ information).
- X+
- X \section{Using GNUPLOT for \LaTeX: a Tutorial}
- X
- X GNUPLOT is by nature an interactive program. Users making plots for
- X***************
- X*** 500,505
- X may be changed.
- X
- X \section{Contact}
- X! Please contact me at dfk@cs.duke.edu with any comments you may have.
- X
- X \end{document}
- X
- X--- 506,515 -----
- X may be changed.
- X
- X \section{Contact}
- X! Please contact me at \verb+dfk@cs.duke.edu+ with any comments you may
- X! have on GNUPLOT's \LaTeX\ driver. For general GNUPLOT questions, send
- X! mail to the GNUPLOT mailing list
- X! (\verb+pixar!info-gnuplot@ucbvax.berkeley.edu+).
- X!
- X
- X \end{document}
- Xdiff -c ./translate/command.c ../patch/translate/command.c
- X*** ./translate/command.c Tue Mar 27 09:03:58 1990
- X--- ../patch/translate/command.c Tue Aug 28 16:07:33 1990
- X***************
- X*** 983,989
- X err_msg(message);
- X
- X if (point && line)
- X! return(LINESPOINTS);
- X if (point)
- X return(POINTS);
- X if (line)
- X
- X--- 983,989 -----
- X err_msg(message);
- X
- X if (point && line)
- X! return((int)LINESPOINTS);
- X if (point)
- X return((int)POINTS);
- X if (line)
- X***************
- X*** 985,991
- X if (point && line)
- X return(LINESPOINTS);
- X if (point)
- X! return(POINTS);
- X if (line)
- X return(LINES);
- X
- X
- X--- 985,991 -----
- X if (point && line)
- X return((int)LINESPOINTS);
- X if (point)
- X! return((int)POINTS);
- X if (line)
- X return((int)LINES);
- X
- X***************
- X*** 987,993
- X if (point)
- X return(POINTS);
- X if (line)
- X! return(LINES);
- X
- X /* should not happen */
- X err_msg("no standard style corresponds to this style");
- X
- X--- 987,993 -----
- X if (point)
- X return((int)POINTS);
- X if (line)
- X! return((int)LINES);
- X
- X /* should not happen */
- X err_msg("no standard style corresponds to this style");
- X***************
- X*** 991,997
- X
- X /* should not happen */
- X err_msg("no standard style corresponds to this style");
- X! return(LINES);
- X }
- X
- X
- X
- X--- 991,997 -----
- X
- X /* should not happen */
- X err_msg("no standard style corresponds to this style");
- X! return((int)LINES);
- X }
- X
- X
- END_OF_patch1b
- if test 63974 -ne `wc -c <patch1b`; then
- echo shar: \"patch1b\" unpacked with wrong size!
- fi
- # end of overwriting check
- fi
- echo shar: End of shell archive.
- exit 0
-
-